<%@page import="com.huixue.cn.ztej.bean.RoleResource"%>
<%@page import="com.huixue.cn.ztej.utils.Urls"%>
<%@page import="com.huixue.cn.ztej.enums.RoleStatus"%>
<%@page import="com.huixue.cn.ztej.bean.User"%>
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page language="java" import="java.util.*"%>

<%
	List<RoleResource> ticker = (List<RoleResource>)request.getSession().getAttribute("ticker");		
%>
<ul id="menu">
<%
	if(ticker!=null && ticker.size()>0){
		for(RoleResource rrs :ticker){
%>
	<li class="manager_tip manager_disc">
        <span ><strong><%=rrs.getResource().getResName()%></strong></span>   
    </li>
<%
		if(rrs.getResource().getHavechild()==1){
%>
	<li class="manager_list hidden">	
<% 		
			List<RoleResource> childTicker = rrs.getResource().getrRoleList();
			for(RoleResource childRrs :childTicker){	
%>
			<a  href="${ctx}/<%=childRrs.getResource().getResUrl().trim()%>"><%=childRrs.getResource().getResName().trim()%></a>
<%

			}
%>
	</li>
<%			
		}
		}
	}
%>
    
</ul>

<script type="text/javascript">
	/* $(document).ready(function(){ 
		$.ajax({
	        type: "POST",
	        dataType: "json",
	        url: '${ctx}/sysMenuFunction/menutree',
	        success: function (msg) {
	        	if(msg.status!='0'){
	        		window.location.href = '${ctx}'+ msg.data;
	        	}else{
	        		var menustr = msg.data;
	        		$('#menu').html(menustr);
	        	} 
	        },
	        error: function(data) {
	            alert("errorssss:"+data.error);
	         }
	    });
	}); 	 */
</script>
